-- 卡池管理器
local MoneyManager = {}
local UINodes = require("Data.UINodes")
local MathUtils = require("Utils.MathUtils")
local PrefabFactory = require("Utils.PrefabFactory")
local Consts = require("Data.Consts")

-- 在x,y坐标1-10范围内生成方块
-- 更精确的位置计算
local blockSize = 2

local destroyedBlocks = {}
-- print(cardInfos)

function MoneyManager:updateMoneyUI(height)
    -- print("update ui")
    for _, role in ipairs(GameAPI.get_all_valid_roles()) do
        -- 获取角色控制的单位
        local character = role.get_ctrl_unit()

        local roldId = role.get_roleid()
        -- print("获取背包")

        -- print(character.get_equipment_list(Enums.EquipmentType.BASIC, false, false))
        -- print(character.get_equipment_list(Enums.EquipmentType.WEAPON, false, false))
        --      LuaAPI.unit_register_trigger_event(character, { EVENT.SPEC_COMMODITY_CONSUME }, function(_, _, data)
        -- 	print("消耗物品")
        --     print(data)

        -- end)
        -- role.set_label_text(UINodes["金币文本"],G.coins[roldId])
        -- role.set_attr_bonus_fixed(Consts.CoinType.Gold, math.tofixed( G.coins[roldId]))
    end

end

-- 测试代码

return MoneyManager
